package vn.edu.ptithcm.pim.service;


import java.util.List;

import vn.edu.ptithcm.pim.dao.EmployeeDao;
import vn.edu.ptithcm.pim.dom.Employee;
import vn.edu.ptithcm.pim.dom.Function;
import vn.edu.ptithcm.pim.query.EmployeeQuery;

@SuppressWarnings({ "rawtypes" })
public class EmployeeService {
	private EmployeeDao employeeDao;

	public EmployeeDao getEmployeeDao() {
		return employeeDao;
	}

	public void setEmployeeDao(EmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}

	public void save(Employee employee) {
		employeeDao.save(employee);
	}

	public void saveOrUpdate(Employee employee) {
		employeeDao.saveOrUpdate(employee);
	}

	public void lock(Employee employee) {
		employeeDao.lock(employee);
	}

	public void delete(Employee employee) {
		employeeDao.delete(employee);
	}

	public Employee merge(Employee employee) {
		return employeeDao.merge(employee);
	}

	public Employee findById(java.lang.Long id) {
		return employeeDao.findById(id);
	}

	public List findByExample(Employee employee) {
		return employeeDao.findByExample(employee);
	}

	public List getAll() {
		return employeeDao.getAll();
	}

	public List getMembersForProject(Long projectId) {
		return employeeDao.getMembersForProject(projectId);
	}

	public List getMembersInProject(Long projectId) {
		return employeeDao.getMembersInProject(projectId);
	}

	public List getEmployeesInProjectBySearchKey(Long projectId, Long rankId,
			Long diplomaId, String language, String searchKey) {
		return employeeDao.getEmployeesInProjectBySearchKey(projectId, rankId,
				diplomaId, language, searchKey);
	}

	public List getMembersForProjectBySearchKey(Long projectId, Long rankId,
			Long diplomaId, String language, String searchKey) {
		return employeeDao.getMembersForProjectBySearchKey(projectId, rankId,
				diplomaId, language, searchKey);
	}

	public Function getFunctionsInProject(Long projectId, Long employeeId) {
		return employeeDao.getFunctionInProject(projectId, employeeId);
	}

	public Employee findByVisa(String visa) {
		return employeeDao.findByVisa(visa);
	}
	public void deleteById(java.lang.Long id) {
		employeeDao.deleteById(id);
	}

	public List<Employee> findByQuery(EmployeeQuery query, int max, int offset) {
		return employeeDao.findByQuery(query, max, offset);
	}

	public int countByQuery(EmployeeQuery query) {
		return employeeDao.countByQuery(query);
	}
}
